<template>
  <el-container>
    <basic-crud :option="option" apiGetListUrl="/mes/problemFeedbackController/grid">
    </basic-crud>
  </el-container>
</template>

<script setup>
import {formatDate} from "../../../utils/formatTime"

const option = ref({
  highlightCurrentRow: true,
  addBtn: false,
  editBtn: false,
  viewBtn: true,
  delBtn: false,
  size: 'small',
  menuWidth: 80,
  column: [
    {
      label: "状态",
      prop: "status",
      width: 80,
      sortable: true,
      search: true,
      searchType: 'select',
      virtualize: true,
      statusShow: true,
      statusTag: true,
      statusTypeMap: {
        Suspended:'danger',
        Obsoleted:'success',
      }
    },
    {
      label: "编号",
      prop: "code",
      overHidden: true,
      minWidth: 200,
    },
    {
      label: '产品型号',
      prop: 'modelName',
      search: true,
      minWidth: 180,
    },
    {
      label: '产品名称',
      prop: 'productName',
      search: true,
      minWidth: 180,
    },
    {
      label: '产品编号',
      prop: 'productCode',
      search: true,
      minWidth: 150,
    },
    {
      label: "创建时间",
      prop: "proposeTime",
      overHidden: true,
      width: 120,
      formatter: (row) => {
        return row.proposeTime?.substring(0, 10) || "";
      },
    },
    {
      label: "结束时间",
      prop: "zeroingTime",
      overHidden: true,
      width: 120,
      formatter: (row) => {
        return row.zeroingTime?.substring(0, 10) || "";
      },
    },
    {
      label: '问题类型',
      prop: 'problemClassifysText',
      width: 180,
      overHidden: true,
      span: 24,
    },
    {
      label: "问题描述",
      prop: "problemDesc",
      overHidden: true,
      minWidth: 260,
    },
    {
      label: "解决方案",
      prop: "solution",
      overHidden: true,
      minWidth: 260,
    },
    {
      label: "附件",
      prop: "fileNames",
      slot: true,
      overHidden: true,
      minWidth: 300,
    },
  ]
})
</script>

<style scoped>

</style>
